package cn.kgc.service.impl;

import cn.kgc.mapper.DepMapper;

import cn.kgc.pojo.Dep;
import cn.kgc.service.DepService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**

 * @author 王作栋
 *
 *
 * 
 * @version 1.0
 * @date 2022/10/7 - 16:46
 */
@Service
public class DepServiceImpl implements DepService{
     @Autowired
     private DepMapper depMapper;


    @Override    
    public List<Dep> getDepList(String depName, Integer currentPage, Integer limit, Integer deptCount) {
        return depMapper.getDepList(depName,currentPage,limit,deptCount);
    }

    @Override
    public List<Dep> getBookById(Integer depId) {
        return depMapper.getBookById(depId);
    }

    @Override
    public int addDep(Dep dep) {
        return depMapper.addDep(dep);
    }

    @Override
    public int updateDepByName(Dep dep) {
        return depMapper.updateDepByName(dep);
    }

    @Override
    public int deleteDepById(Dep dep) {
        return depMapper.deleteDepById(dep);
    }

    //删除员工
    @Override
    public int deleteDep(String depId) {
        return depMapper.deleteDep(depId);
    }

    @Override
    public int getTotalRow(String depName) {
        return depMapper.getTotalRow(depName);}

    @Override
    public List<Dep> findDepList() {
        return depMapper.findDepList();

    }

    @Override
    public List<Dep> chartzhu() {
        return depMapper.chartzhu();
    }


}
